using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._NetworkAnalystTools._TurnFeatureClass
{
    /// <summary>
    /// <para>Populate Alternate ID Fields</para>
    /// <para>Creates and populates additional fields on the turn feature classes that reference the edges by alternate IDs. The alternate IDs allow for another set of IDs that can help maintain the integrity of the turn features in case the source edges are being edited.</para>
    /// <para>在转弯要素类上创建并填充其他字段，这些字段通过备用 ID 参照边。备用 ID 允许使用另一组 ID，这些 ID 可在编辑源边时帮助保持转弯要素的完整性。</para>
    /// </summary>    
    [DisplayName("Populate Alternate ID Fields")]
    public class PopulateAlternateIDFields : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public PopulateAlternateIDFields()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_network_dataset">
        /// <para>Input Network Dataset</para>
        /// <para>The network dataset whose turn feature classes are to receive alternate ID fields. The fields will be created on all of the turn feature classes added as a turn source to the network dataset.</para>
        /// <para>其轮次要素类将接收备用 ID 字段的网络数据集。将在作为转弯源添加到网络数据集的所有转弯要素类上创建字段。</para>
        /// </param>
        /// <param name="_alternate_ID_field_name">
        /// <para>Alternate ID Field Name</para>
        /// <para>The name of the alternate ID field on the edge feature sources of the network dataset. All edge feature sources referenced by turns must have the same name for the alternate ID field.</para>
        /// <para>网络数据集的边缘要素源上的备用 ID 字段的名称。轮次参照的所有边要素源必须具有相同的备用 ID 字段名称。</para>
        /// </param>
        public PopulateAlternateIDFields(object _in_network_dataset, object _alternate_ID_field_name)
        {
            this._in_network_dataset = _in_network_dataset;
            this._alternate_ID_field_name = _alternate_ID_field_name;
        }
        public override string ToolboxName => "Network Analyst Tools";

        public override string ToolName => "Populate Alternate ID Fields";

        public override string CallName => "na.PopulateAlternateIDFields";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_network_dataset, _alternate_ID_field_name, _out_network_dataset];

        /// <summary>
        /// <para>Input Network Dataset</para>
        /// <para>The network dataset whose turn feature classes are to receive alternate ID fields. The fields will be created on all of the turn feature classes added as a turn source to the network dataset.</para>
        /// <para>其轮次要素类将接收备用 ID 字段的网络数据集。将在作为转弯源添加到网络数据集的所有转弯要素类上创建字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Network Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_network_dataset { get; set; }


        /// <summary>
        /// <para>Alternate ID Field Name</para>
        /// <para>The name of the alternate ID field on the edge feature sources of the network dataset. All edge feature sources referenced by turns must have the same name for the alternate ID field.</para>
        /// <para>网络数据集的边缘要素源上的备用 ID 字段的名称。轮次参照的所有边要素源必须具有相同的备用 ID 字段名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Alternate ID Field Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _alternate_ID_field_name { get; set; }


        /// <summary>
        /// <para>Updated Input Network Dataset</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Input Network Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_network_dataset { get; set; }


        public PopulateAlternateIDFields SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}